/**
 *  The ColliePanel represents the main application panel. This panel fully
 *	populates the main application frame. It comprises three split panes.
 *	On the left is the project pane sharing with the diagram pane on the
 *	right. Together, these two share with the properties pane which occupies
 *	the full width of the lower region.
 *
 *  This class implements the singleton design pattern.
 *
 *  @author	K Barclay
 */

package window;

import java.awt.*;

import javax.swing.*;

import diagram.CollaborationDiagram;

//class ColliePanel
public final class ColliePanel extends JPanel{

	private JSplitPane		projectDiagramSplitPane;
    private JSplitPane		projectDiagramPropertySplitPane;
    
    private CollieProjectPanel projectPanel;
    private CollieDiagramPanel diagramPanel;
    private ColliePropertyPanel propertyPanel;

    
    public ColliePanel(CollaborationDiagram diagram) {
    	super(new BorderLayout());
    	
    	projectPanel = new CollieProjectPanel();
    	diagramPanel = new CollieDiagramPanel(diagram);
    	propertyPanel = new ColliePropertyPanel(diagram);
    	projectDiagramSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, projectPanel, diagramPanel);
    	projectDiagramPropertySplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, projectDiagramSplitPane, propertyPanel);
    	
    	add(projectDiagramPropertySplitPane, BorderLayout.CENTER);
		
	}

	public void setDivider(){
    	projectDiagramSplitPane.setDividerLocation(0.2);
    	projectDiagramPropertySplitPane.setDividerLocation(0.8);
    }
    
// ---------- properties ----------------------------------

    
    
}	
// ==================================================================
